home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0043_Set the current Drive.pas < prev    next >
Pascal/Delphi Source File  |  1993-09-26  |  1KB  |  34 lines

  1. {****************************************************************************
  2.  * Procedure ..... SetDrive()
  3.  * Purpose ....... To set the current drive
  4.  * Parameters .... i          Drive number to change to (0=A, 1=B, 2=C, etc.)
  5.  * Returns ....... N/A
  6.  * Notes ......... None
  7.  * Author ........ Martin Richardson
  8.  * Date .......... May 13, 1992
  9.  ****************************************************************************}
  10. PROCEDURE SetDrive( i : INTEGER ); ASSEMBLER;
  11. ASM
  12.      MOV  AH, 0Eh
  13.      MOV  DL, BYTE PTR i
  14.      INT  21h
  15. END;
  16.  
  17. {****************************************************************************
  18.  * Procedure ..... SetCDrive()
  19.  * Purpose ....... To set the current drive
  20.  * Parameters .... c          Drive letter to change to
  21.  * Returns ....... N/A
  22.  * Notes ......... Same as SetDrive, but you pass the drive letter instead of
  23.  *                 number.
  24.  *               . Uses function SetDrive
  25.  * Author ........ Martin Richardson
  26.  * Date .......... May 13, 1992
  27.  ****************************************************************************}
  28. PROCEDURE SetCDrive( c :CHAR );
  29. BEGIN
  30.      IF ( c IN ['A'..'Z'] ) THEN
  31.         SetDrive( POS( c, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ) - 1 );
  32. END;
  33.  
  34.